package com.mvc.controller;

import com.common.core.BaseController;
import com.jfinal.kit.JsonKit;
import com.mvc.request.ReqNotice;
import com.mvc.request.ReqPage;
import com.mvc.request.ReturnData;
import com.mvc.response.RspNotice;
import com.mvc.response.RspPage;
import com.mvc.service.NoticeService;
import com.mvc.service.impl.NoticeServiceImpl;

/***
 * 消息公告
 * @author Administrator
 *
 */
public class NoticeController extends BaseController{
	
	NoticeService noticeService = new NoticeServiceImpl();
	
	public void queryNoticePage()
	{
		ReqPage req = getRequestObject(ReqPage.class);
		ReturnData<RspPage<RspNotice>> data = noticeService.queryPage(req);
		renderJson(JsonKit.toJson(data));
	}

	/***
	 * 获取详情
	 * 
	 * @param req
	 * @return
	 */
	public void getInfo()
	{
		ReqNotice req = getRequestObject(ReqNotice.class);
		ReturnData<String> data = noticeService.getInfo(req);
		renderJson(JsonKit.toJson(data));
	}
}

